function init_page_table(obj, loadSuccess) {
	function serializeObject(obj, aoData) {
		if (obj == null || obj == undefined) {
			return
		}
		var a = obj.serializeArray();
		$.each(a, function() {
			aoData[this.name] = this.value || ""
		});
		return aoData
	}
	var datatableInit = function(me) {
		var dataTableId = $(me).attr("id");
		var aoColumns = [];
		var oTable;
		function retrieveData(page) {
			var sSource = $("#" + dataTableId).data("action");
			var aoData = {};
			var params = $("#" + dataTableId).data("params");
			if ($.isNotEmpty(params)) {
				for ( var name in params) {
					aoData[name] = params[name]
				}
			}
			aoData = serializeObject($("#" + dataTableId + "_form"), aoData);
			$
					.ajax({
						"dataType" : "json",
						"type" : "POST",
						"url" : sSource,
						"data" : aoData,
						"beforeSend" : function() {
							jQuery(".loading").removeClass("ui-hidden")
						},
						"complete" : function(XMLHttpRequest, textStatus) {
							jQuery(".loading").addClass("ui-hidden")
						},
						"success" : function(json) {
							if (json == null || json == "" || json == undefined
									|| json.code > 0) {
								if (json == undefined) {
									$.confirm({cancelButton: "关   闭",title: '提示',text:"操作错误!"});
								} else {
									if (json.code == 10000) {
										$.confirm({cancelButton: "关   闭",title: '提示',text:"您没有资源操作权限!"});
									} else {
										$.confirm({cancelButton: "关   闭",title: '提示',text:json.message|| ""});
										if (json.data != undefined) {
											fnCallback(json.data, dataTableId)
										}
									}
								}
							} else {
								if (json.data != undefined) {
									fnCallback(json.data, dataTableId)
								}
							}
						},
						"error" : function(xhr, textStatus, errorThrown) {
							$.confirm({cancelButton: "关   闭",title: '提示',text:"操作错误,请刷新页面!"});
						}
					})
		}
		var fnCallback = function(data, tableId) {
			var html = [];
			for (var i = 0; i < data.length; i++) {
				var row = data[i];
				html.push("<tr>");
				for (var j = 0; j < aoColumns.length; j++) {
					var col = aoColumns[j];
					var cLable = col["mData"];
					var cData = row[cLable];
					if (typeof col["mRender"] === "function") {
						var returnHtml = col["mRender"](cData, cLable, row);
						html.push("<td>" + returnHtml + "</td>")
					} else {
						if (cData != undefined && cData != "undefined"
								&& cData != null && cData != "") {
							html.push("<td>" + cData + "</td>")
						} else {
							html.push("<td></td>")
						}
					}
				}
				html.push("</tr>")
			}
			$("#" + tableId + " > tbody").html(html.join("")).trigger("footable_redraw");
			if (loadSuccess) {
				loadSuccess()
			}
		};
		$("#" + dataTableId).find("thead > tr:eq(0) > th,thead > tr:eq(0) > td").each(function(index, element) {
							var $this = $(this);
							var item_o = {};
							item_o["mData"] = $this.data("title") || "";
							if ($this.data("crud")) {
								item_o["mRender"] = function(data, name, row) {
									var th_div_html = $.trim($this.find(
											"div:hidden").html()
											|| "");
									if (th_div_html == "") {
										return ""
									}
									var title = $this.data("title");
									for ( var key in title) {
										do {
											th_div_html = th_div_html.replace(
													":" + key, row[title[key]])
										} while (th_div_html.indexOf(key) != -1)
									}
									$this
											.find("span")
											.each(
													function(index) {
														if ($(this)
																.data("type") == "change") {
															var associate = $(
																	this)
																	.data(
																			"associate");
															var changeValue = $(
																	this)
																	.data(
																			"change_value");
															var value = full[associate];
															for ( var key in changeValue) {
																if (value == key) {
																	var text = $(
																			this)
																			.text();
																	var start = th_div_html
																			.lastIndexOf(text);
																	var end = start
																			+ text.length;
																	th_div_html = th_div_html
																			.substring(
																					0,
																					start)
																			+ changeValue[key]
																			+ th_div_html
																					.substring(
																							end,
																							th_div_html.length);
																	break
																}
															}
														}
													});
									return th_div_html
								}
							} else {
								var type = $this.data("type");
								if (type == "enum") {
									item_o["mRender"] = function(data, name,
											row) {
										var opts = $this.data("opt");
										for ( var key in opts) {
											if (data == key) {
												return opts[key]
											}
										}
										return ""
									}
								} else {
									if (type == "callback") {
										var th_callback = $this
												.data("callback");
										if (th_callback != undefined
												&& th_callback != "") {
											item_o["mRender"] = eval(th_callback)
										}
									} else {
										if (type == "datetime") {
											var formater = $this
													.data("formater");
											if (formater == undefined
													|| formater == "") {
												formater = "yyyy-MM-dd HH:mm:ss"
											}
											item_o["mRender"] = function(data,
													name, row) {
												if (data == undefined
														|| data == "") {
													return ""
												}
												return new Date(data)
														.format(formater)
											}
										} else {
											if (type == "date") {
												var formater = $this.data("formater");
												if (formater == undefined|| formater == "") {
													formater = "yyyy-MM-dd"
												}
												item_o["mRender"] = function(data, name, row) {
													if (data == undefined|| data == "") {
														return ""
													}
													return new Date(data).format(formater)
												}
											} else {
												if (type == "substr") {
													var range = $this.data("range");
													if (range == undefined|| range == "") {
														range = "1,2"
													}
													var start = Number(range.substr(0, 1));
													var end = Number(range.substr(2, 3));
													if (start == undefined|| start == "") {
														start = 0
													}
													if (end == undefined|| end == "") {
														end = 100
													}
													item_o["mRender"] = function(data, name, row) {
														if (data == undefined|| data == "") {
															return ""
														}
														if (data.length < end) {
															return data
														}
														return data.substr(start, end)+ "..."
													}
												}
											}
										}
									}
								}
							}
							aoColumns.push(item_o)
						});
		$("#" + dataTableId).footable();
		$("#" + dataTableId + "_search").on("click", function() {
			retrieveData()
		});
		retrieveData()
	};
	if (obj == null || obj == "") {
		$("table[data-datatable=true]").each(function() {
			datatableInit(this)
		})
	} else {
		datatableInit(obj)
	}
};